package com.bwie.car.controller;

import com.bwie.car.service.CarService;
import com.bwie.common.domain.Car;
import com.bwie.common.domain.Records;
import com.bwie.common.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author：杨鹏
 * @Package：com.bwie.car.controller
 * @Project：yp_zhoukao723
 * @name：CatController
 * @Date：2024/7/23 9:47
 */
@RestController
@RequestMapping("car")
public class CatController {

    @Autowired
    private CarService carService;

    @PostMapping("listCar")
    public Result listCar(@RequestBody Car car){
        return carService.listCar(car);
    }

    @PostMapping("addRecords")
    public Result addRecords(@RequestBody Car car){
        return carService.addRecords(car);
    }

    @PostMapping("updRecords")
    public Result updRecords(@RequestBody Records records){
        return carService.updRecords(records);
    }

    @GetMapping("listType")
    public Result listType(){
        return carService.listType();
    }


    @GetMapping("listStatus")
    public Result listStatus(){
        return carService.listStatus();
    }

    @GetMapping("listRecords")
    public Result listRecords(){
        return carService.listRecords();
    }

}
